Codec Calculator is built from the ground up to calculate values pertaining to digital video files (i.e. QuickTime and MPEG). For example, it can help you find out how many MB of space a certain movie will take up at a given data rate. This is great if you're archiving those old home VHS tapes onto CD and need to know how many minutes you can cram onto the disc.
Why is it?
I wrote this program out of frustration: I was sick of using a normal calculator to figure out data rates, sizes, times, sample rates before doing a timely compression.
System Requirements
68020 and System 7.1 or higher (for the applications)
or
Mac OS X Terminal for the cdct.out file
What comes in the package:
Codec Calculator 2.0 - System 7 or later
Codec Calculator T 1.0 - System 7 or later
cdct.out - OSX Terminal
Read Me
What is a Codec?
Codec stands for Compressor/Decompressor. A codec is a method in which the computer stores audio and video data. A famous codec for audio is MP3 (MPEG Layer-3).
What is the data rate?
The data rate of a multimedia file is the amount of data from a file that the computer must process at any one time. A standard measure for data rate is k/sec or kilobytes per second. Knowing the data rate of a video/audio file is important if you are in the business of encoding files. Here's an example of how important data rate is: an MP3 file has a data rate of 15.3k/sec. So for 3 seconds of MP3, you'll need 45.9k of hard disk space. Knowing data rate can help predict total file sizes.
General Use
First off determine what you are going to do by the information you need from the calculator.
General Calculation
To make general calculations involving data rate, time, and movie size/free disk space use the four buttons labeled "MaxTime in MB", MaxTime in GB, MaxSize, Data Rate
Use My #s
Ignores the values calculated from the Video and Audio Compressor sections when checked. To use the data rate values calculated uncheck this box. Only for the GUI version of Codec Calculator.
MaxTime in MB
Use this button to find out how many hours/minutes of video can go onto a typical 650MB CD. It'll ask you for a data rate and movie size (or free disk space).
NOTE: Some CD-R's you buy might store anywhere from 645MB to 660MB even though they are advertised as 650MB. To be on the safe side check your CD's before doing a time consuming compression.
MaxTime in GB
Same instructions as above but instead of calculating in megabyte (MB), its in gigabyte (GB).
While you can use this to calculate maximum time allowed on a DVD, most people don't have access to that. Most people should use this to calculate how much time of analog/digital video can be stored onto their hard disk.
MaxSize
If you're not sure about the final size of a movie, this button will tell you. It requires both the time and data rate to function.
Data Rate
If you want to know the data rate for a certain time and storage use this button. Requires both time and storage size in either MB or GB.
Specific Calculation
This section is for the true geeks of digital video compression. For the most part, the controls encompass everything but the four buttons above the "Update" button. While following the steps below hit the "Update" button at anytime to see your changes
Video Compressor - Choose the codec you want, then put the width and height. Now hit "Update"
Motion - Type in your movie's frame rate or choose it from the popup menu. A data rate based on your codec choice should be in place. If you want to ignore any calculations for video then click "Limit data rate to".
After completing the above information you should now have an estimate for the Video Data Rate.
Audio Compressor - Choose your compressor. Notice that radio buttons below it will change. This is only to reflect what the real codec restricts (i.e. MACE3:1 doesn't support 16 bit sound).
Type in a sampling rate or choose it from the popup menu. Choose an allowed sample size and number of channels. Special codecs like QDesign 2 or Qualcomm PureVoice™ have their own options in addition to the rest. QDesign 2 uses a bit rate menu to completely control data rate, so it doesn't rely on sample rate, size, and channels. PureVoice™ uses the listed compression ratios and the sampling rate to determine data rate.
After completing the above information you should now have an estimate for the Audio Data Rate and Total Data Rate.
Byte Converter
If at anytime you're confused about a data rate such as how many kilobytes per second a 56kbits/s data rate is then use this. Calculations done here are stand alone and do not effect the outcome of your summary. The "C" button to the right of k/second is a clear button for both fields.
Summary
This box displays all the output of the calculations. Seems small considering how many choices you have, but this what it all comes down to.
MPEG Section (only in the GUI version)
Summary
The results of your choices. Use this to set up your MPEG compression software. Not all these features will be in every MPEG compression application.
MPEG
Total Stream - total data rate of the MPEG file. This will modify video and system stream data rates, not audio. To set audio data rate use the Bitrate popup menu
NTSC or PAL - doesn't effect data rate. Only indicates what video standard will be used.
MPEG2 - Indicates that the video stream will be encoded in MPEG and modifies the slider to correspond with MPEG2/DVD values.
Presets
VCD - Video Compact Disc - CD media with MPEG1 video+audio playable in VCD players, some DVD players and modified game consoles (Saturn, Dreamcast, PlayStation). Popular in Asia and Europe.
SVCD - Super Video Compact Disc - a modification to the VCD standard. Uses MPEG2 video instead of MPEG1 video, for higher resolution but less time. Playable in DVD players. Popular in Asia and Europe.
DVD - Digital Video Disc - Made to replace VHS, VCD, and SVCD. Uses MPEG2 video and a wide variety of audio formats.
Video stream
Aspect Ratio - varies from NTSC, PAL, and SECAM
Frame Rate (fps) - frames per second of video
Audio Stream
Sample - Sampling rate in kHz.
Bitrate - data rate of the audio stream in kbps (kilobits per second). This will directly effect the total data rate.
Channels - format of sound channels. Joint Stereo store only differences between channels. Dual and Stereo keep 2 channels seperate. Mono combines both channels into 1.
Emphasis - Not commonly used. Only experts will use this.
Storage Media
Capacity - Storage destination of the final MPEG file your compression software will create. This will help in finding the amount of time that fits onto different mediums.
Using the Text version
This version has the same features that the GUI version does, but its in a small text window. For the specific calculations mentioned above use the "Edit Video" and "Edit Audio" menu options. Then choose the "Print Summary" menu option to get a summary. For General calculations, as described above, choose the "General Calculations" menu option. To flush all data, choose the "Flush Data" menu option. There are no MPEG features or new codecs in the text version.
What's that "cdct.out" file?
If you're in Mac OS X, move the file "cdct.out" to your Home folder. Now open up the Terminal application found in the Utilites folder in the Applications folder. Type or copy/paste the following (without quotes) "./cdct.out" and hit return. That's it, the program should now be running. Follow the instructions for the Text version. Now you can brag to your PC friends that you can command line too.
What's to come?
Classic and Carbon versions are in the works. Support for MPEG-4 and other codecs that happen to be released after this release.
What's New?
2.0
- MPEG-1 and MPEG-2 prediction
- QuickTime 5 support
- 6 new video codecs
- 5 new audio codecs
- frame size popup menu
- clear button for Byte Converter
- live updating
- huge internal code changes
The following video codecs are supported: BlackMagic™ 8bit 2Vuy, BlackMagic™ 10bit v210, ZyGoVideo, Sorenson 3, On2 VP3 Video 3.2, and Jamby 263. Newly supported audio codecs include Apple GSM10:1, 24bit Integer, 32bit FloatingPoint/Integer, and 64bit FloatingPoint.
1.0
Completely revised interface similar to QuickTime Player's Export dialog. Added support for all the QuickTime 4 codecs and MP3 for iTunes users. Data rate information is now dynamically updated. Implemented a byte converter for kbps to kilobyte and vice versa. Added a Text and Terminal Version for people with Mac OS X and a hatred for GUIs.
0.1a2
Early functional build. Calculates data rates for only 2 commercial codecs: Qualcomm PureVoice™ and IMA4:1. Ironically the HyperCard stack is more powerful and friendlier than the application.
FAQ
Q: Astarte M.Pack and Media Cleaner do most of these calculations for me. Why should I use your calculator?
A: Astarte M.Pack only does MPEG and Media Cleaner calculates twice as many numbers as Codec Calculator. I recommend having both programs since each has a nice feature set. The only problem for some people, is that they may not have $400 or more to throw at a simple hobby. Codec Calculator also takes up less memory than M.Pack and Cleaner do.
Q: My computer has more codecs than Codec Caculator supports.
A: You might be using a video capture card, USB video input device, or a DV enabled video editing software. I try to support as many codecs as possible as more come out. If you wish to see a codec supported drop me a line at the email address below.
Q: Real, Windows Media Player, and DivX codecs are not listed.
A: I have no interest in supporting these codecs. Take into consideration that every codec has 3 basic elements: time, file size, and data rate. Use the general controls to calculate these numbers.
Q: Why did Codec Calculator predict a wrong data rate using the DV codecs listed in the video compressor menu?
A: It is most possible that you are using iMovie. DV programs, like iMovie, work with .dv files otherwise known as DV streams. Don't use the DV video codecs unless you have a special purpose. If you are trying to predict how much DV footage will fit on your iMac's hard drive know this: iMovie's tutorial files are DV streams with a data rate of 7.2MB/sec. Use the basic controls to calculate.
Q: Why does my MPEG software lack some features included in Codec Calculator?
A: Compression options for MPEG varies from program to program. The most common controls are data rate or bit rate, FPS, video standard (NTSC/PAL), audio sample rate, and video size.
Q: I don't have any of the new codecs added. Where can I get them?
A: Sorenson 3 comes with QuickTime 5.02. On2 VP3 and ZyGoVideo can be downloaded via the QuickTime Updater. Below is a list of websites for more information on the new video codecs.
Codec Calculator can predict video codecs to an accuracy within 100k for some codecs. This is due to the variable bit rate nature of video codecs, the amount of compression applied (quality), and any codec specific options. In this version there is no support for quality or any codec specific options. To ensure your numbers match the predictions, set your video quality to medium. Remember that the total data rate is the sum of the audio and video data rates. What codec calculator can accurately predict is the audio codecs, the basic data rate, file size, and time. MPEG predictions are accurate only if your MPEG compression software is very strict on data rate tracking. If it is not strict, then Codec Calculator's predictions will be slightly off by 1MB in file size (only very extreme cases).
I am not associated with any compression company. In no way am I attempting to advertise or push one codec over another. This is simply a calculator.
How much does Codec Calculator cost?
This program can be used free of charge (freeware). However, I do spend many hours researching for and coding this program. If you find yourself using Codec Calculator regularly, consider donating US $5 to the address below. You can also send postcards. Not only will you encourage future versions to be superior, but you'll help out a college student get through school. Any donations are greatly appreciated.
If you want to donate send a check/money order/postcard to:
Codec Calculator
117 Courtyard Lane
Storrs, CT 06268
Distribution
You can pass Codec Calculator along to anyone as long as you keep all the files together and unmodified. If you plan to put Codec Calculator on a CD please drop me a line at the address below and send me a copy if possible, so i can keep track of where its been. All other trademarks are the property of their respective owners.
Questions, comments, suggestions, bug reports, or want to see support for other codecs?